package gen

import (
	"os"
	"path/filepath"
	"strings"
)

func GetGeneratedModel(path string) map[string]bool {
	// 寻找该目录下的.go文件
	files := map[string]bool{}
	filepath.Walk(path, func(path string, info os.FileInfo, err error) error {
		if info.IsDir() {
			//忽略目录
			return nil
		}
		if strings.HasSuffix(strings.ToLower(info.Name()), ".go") {
			files[info.Name()] = true
		}
		return nil
	})
	return files
}
